Flesh out the Download Data button#28
Conversation
|
Thanks for the PR... I found I needed to specify a Running |
|
Ah - I see, it's the "Copy" button that launches the Download dialog. That's the one button I didn't try! The The download dialog is really nice, but maybe it should live under a download button and leave the "Copy" button to just do Copy. That's the one-click action that I use the most for these samples. |
Sure thing I can make it be a download button. That said this was originally an issue for me because the copy URL isn't really a valid S3 URL. See discussion here: zarr-developers/zarr-python#3496 (comment)
Yes that's end point, then each image gets an S3 url with the rest of the path. I took inspiration from the aws cli download link at the top of the page
Huh weird, can you post the error message so I can update the readme properly. I've never experienced that |
I'm not sure how to replicate the |
|
I'm not sure I understand zarr-developers/zarr-python#3496. But this works OK: |
|
I found that very confusing at first. My understanding is that
Unfortunately there seems to be no mechanism for specifying both an endpoint url and the bucket/path in a single string. So there isn't really a valid way to "fix" the naming. It took me a while to figure out why the ome-zarr cli could handle this, and why your code example runs. I think the short of it is that there are enough similarities between an S3 store and HTTPS store that we can kind of get away with it. You code example runs because it is requesting the content of a file in a known spot. However if you try to list the keys available on the store it will (incorrectly) return nothing. For example: # /// script
# requires-python = ">=3.11"
# dependencies = [
# "zarr",
# "s3fs",
# ]
# ///
import zarr
z = zarr.open(
"https://uk1s3.embassy.ebi.ac.uk/idr/zarr/v0.5/idr0062A/6001240_labels.zarr"
)
print("KEYS")
print(list(z.keys()))
# despite there not being keys you can just go ahead an list things
print(z["0"].shape)
# Opening as a true S3 store
z = zarr.open(
"s3://idr/zarr/v0.5/idr0062A/6001240_labels.zarr",
storage_options={
"anon": True,
"client_kwargs": {"endpoint_url": "https://uk1s3.embassy.ebi.ac.uk/"},
},
)
print(z["0"].shape)gives: which can potentially have an impact on any downstream application that loads the zarr and lists the groups.
I'm certainly not arguing that the second way to access is better, e.g. see my rejected PR. Just that is it technically correct way to access that store. |
|
Ah, OK - I understand a bit better now. I've never actually used In your example, I see that you get a warning when you do this at the end: |
|
Interesting how we have different perspectives on zarr usage from using it in different contexts! So is this URL meant to be used as an HTTP store? If so, why is it using S3 infrastructure to achieve that, can that be easily changed? Or maybe im just fully not understanding there. it is also an HTTP url hosted on S3 style infrastructure, and I should not have used .keys() on an http store and expected it to work
I listed all the objects with : and that error is coming from this line: https://github.com/zarr-developers/zarr-python/blob/be519b006f3073c3c0d56801cd2daa597538fd59/src/zarr/core/group.py#L3535-L3549 due to this extra object in the hierarchy:
|
|
my one real concern with leaving hte copy button as is is that there will me more users who, like I did, try to put that into zarr and get hit with a confusing situation. Is there an easy way to protect people from that, while also maintaining the ease of the one click workflow for knowledgeable users? What if shift-click the button still copied, and normal click opened the modal. With some instructions at the top about this. |
|
OK, I guess it doesn't have to be just one click! Also, it would be nice to enable dialog closing when you click on the background. I tried this again... |
ahhh yes good call. I hate it when modals don't do that, can't believe i didn't think of that.
gahh. that is so bizarre. I've never seen that before. This is after just following the instructions here? https://pixi.sh/dev/installation/ I wonder if it's that your pixi install is somewhat broken, or if somehow the ruby bundler is trying to access other areas |
|
Looking at your earlier error. that looks like some sort of permission error on your laptop with temp dirs. can you maybe try installing wiht brew? https://pixi.sh/latest/installation/#homebrew |
Co-authored-by: William Moore <w.moore@dundee.ac.uk>
|
Seems that the problem is that I don't have permissions to write to my default I also don't have |
|
I added your closing modal change. I'll add a line to readme about this tmpdir stuff |
|
You can probably permanently apply the workaround:
:'( |
|
Also if you're in a mood to review, can I ask you to take a look at #27 |
|
anything more to change here? @joshmoore heads up on this one and #27 in addition to #26 |
|
@ianhi "Maybe just add the https:// URL to the dialog, so it can be copied there like the others. I'm just not sure what to call it!" The URL that is currently copied to the clipboard should still be easily copyable. So you can see & copy it directly from the dialog. Preferably being the first (most obvious) option from the dialog, so that users who previously just clicked the "copy" button can easily see where to get the same thing from the dialog. |
will-moore
left a comment
There was a problem hiding this comment.
Testing locally, with main merged in. Looks great, thanks.
@joshmoore you OK to merge (I don't have permissions)?
|
@ianhi could you merge origin/main into your branch so we can see the changes here a bit clearer? Thanks. |
|
I merged in main. Looks good. Thanks, all! |
|
thanks both! |


Built on top of #26 so I could see the javascript and CSS changes locally.
Closes: #16
Closes: #25
This no longer copies the HTTPS/S3 link. But instead opens a modal with different options for download and makes it clear how to construct an S3 compatible URL
and here is the button click feedback:
Screen.Recording.2025-09-30.at.6.58.26.PM.mov
Going to github ping @will-moore because I see you've made changes and issues in this area but are not watching the repo. Just wanted to let you know that this exists